# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Games.V1.Model.AchievementDefinition do
  @moduledoc """
  An achievement definition object.

  ## Attributes

  *   `achievementType` (*type:* `String.t`, *default:* `nil`) - The type of the achievement.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of the achievement.
  *   `experiencePoints` (*type:* `String.t`, *default:* `nil`) - Experience points which will be earned when unlocking this achievement.
  *   `formattedTotalSteps` (*type:* `String.t`, *default:* `nil`) - The total steps for an incremental achievement as a string.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The ID of the achievement.
  *   `initialState` (*type:* `String.t`, *default:* `nil`) - The initial state of the achievement.
  *   `isRevealedIconUrlDefault` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the revealed icon image being returned is a default image, or is provided by the game.
  *   `isUnlockedIconUrlDefault` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the unlocked icon image being returned is a default image, or is game-provided.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementDefinition`.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the achievement.
  *   `revealedIconUrl` (*type:* `String.t`, *default:* `nil`) - The image URL for the revealed achievement icon.
  *   `totalSteps` (*type:* `integer()`, *default:* `nil`) - The total steps for an incremental achievement.
  *   `unlockedIconUrl` (*type:* `String.t`, *default:* `nil`) - The image URL for the unlocked achievement icon.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :achievementType => String.t() | nil,
          :description => String.t() | nil,
          :experiencePoints => String.t() | nil,
          :formattedTotalSteps => String.t() | nil,
          :id => String.t() | nil,
          :initialState => String.t() | nil,
          :isRevealedIconUrlDefault => boolean() | nil,
          :isUnlockedIconUrlDefault => boolean() | nil,
          :kind => String.t() | nil,
          :name => String.t() | nil,
          :revealedIconUrl => String.t() | nil,
          :totalSteps => integer() | nil,
          :unlockedIconUrl => String.t() | nil
        }

  field(:achievementType)
  field(:description)
  field(:experiencePoints)
  field(:formattedTotalSteps)
  field(:id)
  field(:initialState)
  field(:isRevealedIconUrlDefault)
  field(:isUnlockedIconUrlDefault)
  field(:kind)
  field(:name)
  field(:revealedIconUrl)
  field(:totalSteps)
  field(:unlockedIconUrl)
end

defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.AchievementDefinition do
  def decode(value, options) do
    GoogleApi.Games.V1.Model.AchievementDefinition.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.AchievementDefinition do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
